package com.example.text.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.text.entity.AdminUserRole;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 用户与规则关联表
 *
 * @author hjj
 * @email 1041914134@qq.com
 * @date 2020-06-23 16:02:15
 */
@Mapper
public interface AdminUserRoleDao extends BaseMapper<AdminUserRole> {

    //根据用户名得到id,然后根据id查询AdminUserRole对应的uid的规则 （user.id=AdminUserRole.uid)
    List<AdminUserRole> getRoleByUserName(String username);

      //根据uid,删除所有的AdminUserRole
    void deleteAllByUid(int uid);


}
